/**
 * @name: medicalHistoryService
 * @Description:
 * @Author: 方琦
 * @Date: 2022/6/18 20:42
 **/
import axios from "@/utils/axios";
import api from "@/api";

export default {
    getOperationMsg,//手术信息
    getSpecialTreatment,//特殊治疗
    getAuxiliary,//辅助检查
    getDiagnosisContent,//查询诊断内容
    getFamilyHistory,//家族病
    gethistoryChroni,//过往病史中的慢病史
    getPatinetMessage,//患者信息
    getDiseaseInfo,//过往病史
    getHistoryAllergy,//过敏史
    getDiagnoseOrder,//就诊记录
    getDrugList,//获取所有药物信息
    searchDrugName,//搜索药物
    insertDrugOrder,//记录就诊
}

function insertDrugOrder(Phone, describle, doctorName, hospitalName, list) {
    return axios({
        url: api.medicalHistoryApi.insertDrugOrder,
        method: 'post',
        params: {
            Phone, describle, doctorName, hospitalName
        },
        data: {
            list
        }
    })
}

function searchDrugName(drugName) {
    return axios({
        url: api.medicalHistoryApi.searchDrugName,
        method: 'get',
        params: {
            drugName
        }
    })
}

function getDrugList() {
    return axios({
        url: api.medicalHistoryApi.getDrugList,
        method: 'get'
    })
}

function getDiagnoseOrder(Phone) {
    return axios({
        url: api.medicalHistoryApi.getDiagnoseOrder,
        method: "get",
        params: {
            Phone
        }
    })
}

function getOperationMsg(Phone) {
    return axios({
        url: api.medicalHistoryApi.getOperationMsg,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getSpecialTreatment(Phone) {
    return axios({
        url: api.medicalHistoryApi.getSpecialTreatment,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getAuxiliary(Phone) {
    return axios({
        url: api.medicalHistoryApi.getAuxiliary,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getDiagnosisContent(Phone) {
    return axios({
        url: api.medicalHistoryApi.getDiagnosisContent,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getFamilyHistory(Phone) {
    return axios({
        url: api.medicalHistoryApi.getFamilyHistory,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getHistoryAllergy(Phone) {
    return axios({
        url: api.medicalHistoryApi.getHistoryAllergy,
        method: 'get',
        params: {
            Phone
        }
    })
}

function gethistoryChroni(Phone) {
    return axios({
        url: api.medicalHistoryApi.gethistoryChroni,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getDiseaseInfo(Phone) {
    return axios({
        url: api.medicalHistoryApi.getDiseaseInfo,
        method: 'get',
        params: {
            Phone
        }
    })
}

function getPatinetMessage(Phone) {
    return axios({
        url: api.medicalHistoryApi.getPatinetMessage,
        method: 'get',
        params: {
            Phone
        }
    })
}
